<?php

class Admin_Model_Resource extends Zend_Db_Table_Abstract
{
    public $_configGame;
    public function __construct($partner)
    {
        $configGame     = new Zend_Config_Ini(CONFIG_PATH . '/application.ini', APPLICATION_ENV);
        $this->_configGame = $configGame;
        if(!isset($configGame->partner->$partner)){
            die('Config db not found!!!');
        }
    	$db = $configGame->partner->$partner;
		$db = Zend_Db::factory($db->adapter, $db->params);
        $this->_setAdapter($db);
    }
    protected $_name = 'resource';
    public function getAllData(){
        $query = $this->select()
                        ->from($this->_name, array('resourceId','resourceName','moduleName','controllerName','actionName','menu'));
        return $this->fetchAll($query);
    }
}